package com.lagou.task15;

public class Person<T>{
    private String name;
    private int age;
    private T sex;

    public Person() {

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public T getSex() {
        return sex;
    }

    public Person(String name, int age, T sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    public void setSex(T sex) {
        this.sex = sex;
    }


    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex=" + sex +
                '}';
    }
    public <T1> void printArr(T1[] arr){
        for (T1 tt: arr) {
            System.out.println("tt = " + tt);
        }
    }
    public static void main(String[] args) {

    }

}
